package com.scarecrow.olga.task.event {
	
	import com.scarecrow.olga.task.Task;
	import flash.events.Event;
	
	/**
	 * ...
	 * @author Santiago.J.Elizalde
	 */
	public class TaskEvent extends Event {
		
		static public const TASK_FAILURE:String = "taskFailure";
		static public const TASK_CANCELLED:String = "taskCancelled";
		static public const TASK_COMPLETE:String = "taskComplete";
		static public const TASK_PAUSED:String = "taskPaused";
		static public const TASK_RESUMED:String = "taskResumed";
		
		private var _task:Task;
		private var _taskType:String;
		private var _message:String;
		
		public function TaskEvent(type:String, sourceTask:Task, message:String=null) {
			super(type);
			_task = sourceTask;
			_taskType = type;
			_message = message;
		}
		
		public function get task():Task {
			return _task;
		}
		
		public function get taskType():String {
			return _taskType;
		}
		
		public function get eventMessage():String {
			return _message;
		}
		
	}

}